feat: add RevenueCat integration templates and modular scaffolding support for native apps - #229
Conversation
…pport for native apps
|
@Alisha-21-cloud is attempting to deploy a commit to the Ibrahim's projects Team on Vercel. A member of the Team first needs to authorize it. |
…sha-21-cloud/Better-Fullstack into feat/add-revenuecat-payments
Review — RevenueCat paymentsChecked out the branch into a worktree, ran the full CI-equivalent suite against it, inspected every changed file, and cross-checked against Verdict: Request changesThe feature is well-architected and passes all CI (types build, generate-templates in-sync, 95 snapshots, 603 cli-builder-sync, 55 payments tests, both typechecks, What's good
Findings🔴 HIGH
🟠 MEDIUM
🟡 LOW / polish
Checked and dismissed (no action needed)Broken simple-icons URL / The HIGH (#1) is the blocker; #2–#4 are the next priority. Happy to provide a patch for the |
…pport for native apps
…sha-21-cloud/Better-Fullstack into feat/add-revenuecat-payments
|
@Marve10s Thankyou for the review..!! I will fix them and commit the changes very soon |
…ating - Rewrite native-bare paywall/subscription components to plain react-native primitives (View/Text/Pressable/StyleSheet). They previously imported from `@expo/ui`, which is never added as a dependency, so `native-bare + revenuecat` failed `tsc --noEmit` (TS2307). Matches the PR's stated 'standard StyleSheet' intent for native-bare and the unistyles variant's structure. - Add a revenuecat branch to analyzeStackCompatibility so a web-only stack with payments=revenuecat is auto-normalized to none (mirrors polar), keeping the auto-adjust engine consistent with the prompt/getDisabledReason/CLI gates. - Stop writing REVENUECAT_WEBHOOK_AUTH to apps/server/.env for non-convex backends (frontend-only path has no server webhook route; convex still gets it via packages/backend/.env.local).
The PR branch had reformatted (re-indented) the whole TECH_OPTIONS/ECOSYSTEMS data in constant.ts, producing ~1370 lines of pure-whitespace churn against Development for a single 8-line semantic change. Reset the file to Development and re-add only the RevenueCat payments option, so the diff — and git blame — stay clean and don't collide with concurrent constant.ts work.
Add RevenueCat Payments Integration for Native Apps
Description
This PR introduces RevenueCat as a new payments provider for in-app purchases on native (Expo / React Native) applications.
Unlike the existing Polar integration (which is web-focused and Better-Auth dependent), RevenueCat is native-gated and auth-agnostic. It is exclusively offered when a native frontend is selected (
native-bare,native-uniwind, ornative-unistyles) and when a backend is present.Key Features & Implementation Details
1. Core Integration & Configuration
revenuecattoPaymentsSchema.validatePaymentsCompatibilitynow correctly errors if RevenueCat is selected without a native frontend.payments-revenuecat-requires-native-frontend).apps/webwith a native-frontend requirement constraint, mirroring how Polar gates on Better-Auth.2. Convex Backend Support
convex-revenuecatcomponent viaapp.use(revenuecat)inconvex.config.ts.POST /webhooks/revenuecat).http.ts. If no Better-Auth is used (e.g., Clerk or none), a standalonehttp.tsis generated to avoid clobbering routes.revenuecat.tsclient with utilities likehasEntitlement,isSubscriber, andgetActiveSubscriptions.react-native-purchases), as RevenueCat handles subscription state independently.3. Native Scaffolding & Components
RevenueCatProviderand alib/revenue-catSDK layer.subscription-status-cardandpaywall-examplecomponents.native-bare), NativeWind (native-uniwind), and unistyles (native-unistyles).RevenueCatProvideris conditionally wrapped and mounted within each variant'sapp/_layout.tsx.4. Environment Variables
.env): ScaffoldsEXPO_PUBLIC_REVENUECAT_IOS_KEY,EXPO_PUBLIC_REVENUECAT_ANDROID_KEY, andEXPO_PUBLIC_REVENUECAT_ENTITLEMENT_ID..env.local): AddsREVENUECAT_WEBHOOK_AUTHalong with helpful setup comments for local development.